<!DOCTYPE html>
<html>
  <head>
    <title>客户端1</title>
  </head>
  <body>
    <ul id="messages"></ul>
    <form id="form" action="">
      <input id="input" autocomplete="off" /><button>Send</button>
    </form>
    <script src="http://localhost:3005/socket.io/socket.io.js"></script>//此处主要是为了连接上socket.io.js服务，要与对应的服务端建立关系

    <script>
      var socket = io('http://localhost:3005');
      socket.emit('chat message',"我是客户端1");//发送事件为chat message的信息

      
    </script>
  </body>
</html>
